#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

bool check(int x)
{
    int y = x;
    int sum = 0;
    while (x)
    {
        int t = x % 10;
        x /= 10;
        sum += t * t * t;
    }
    return sum == y;
}

int main()
{
    int x, y;
    scanf("%d %d", &x, &y);
    while (x)
    {
        int cnt = 0;
        for (int i = x; i < y; i++)
        {
            if (check(i))
            {
                printf("%d ", i);
                cnt++;
            }
        }
        if (!cnt) printf("no\n");
        break;
    }
    return 0;
}